#ifndef LUAEXECUTER_H
#define LUAEXECUTER_H

#include <QDialog>
#include <QtLua/State>
#include "luasqlproxy.h"

namespace Ui {
class LuaExecuter;
}

class LuaExecuter : public QDialog
{
    Q_OBJECT
    
public:
    explicit LuaExecuter(QWidget *parent = 0);
    ~LuaExecuter();

public slots:
    void execScript(const QString &filename);

private slots:
    void print(const QString &str);
    
private slots:
    void execLua();

private:
    Ui::LuaExecuter *ui;
    QtLua::State *m_lua_state;
    LuaSqlExec *m_lua_sql_exec;
    LuaSqlNext *m_lua_sql_next;
    LuaSqlValue *m_lua_sql_value;
    QSqlQuery *m_sql;
    QString m_luaScript;
};

#endif // LUAEXECUTER_H
